-- GENERATED SPELL FOR [Reth'hedron the Subduer] --


function spell0_22357(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(41281,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22357', 18000, 1)
end

function spell1_22357(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(41280,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22357', 2000, 1)
end

function Sorts_22357(pUnit, Event)
local choix_sorts_22357 = math.random(0, 1)
if choix_sorts_22357 == 0 then
pUnit:RegisterEvent('spell0_22357', 1, 1)
end
if choix_sorts_22357 == 1 then
pUnit:RegisterEvent('spell1_22357', 1, 1)
end
end

function mob22357_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22357', math.random(1500, 3000), 1)
end

function mob22357_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22357_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22357_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22357, 1, 'mob22357_Action')
RegisterUnitEvent(22357, 2, 'mob22357_Leave')
RegisterUnitEvent(22357, 3, 'mob22357_Kill')
RegisterUnitEvent(22357, 4, 'mob22357_Die')
